-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dashboard: Adds "compressed=1" to /download.bin endpoint. (...) #4966
Conversation
…ownload buffer size to 256KB.
Thanks @fdcastel |
Cool idea, could this also being made for sonoff and shelly deviices? |
Sure! For now I migrated only my Tasmota devices. I do have both Shelly gen1 and gen2 devices, also. But I didn't convert them to ESPHome yet. I wish to better understand how the temperature and overvoltage protection of these devices work before I make the jump. The two generations differs significantly in its API, but both have something equivalent of
I just don't know about Shelly support of compressed images. For gen2 (ESP32 based devices) firmware size should not be a problem, however. I will report back here after finished my ESPHome + Shellies tests. |
Done in esphome/esphome-docs#3004 |
I believe shelly devices require an intermediate firmware to then flash to a 3rd-party firmware, see: https://github.com/tasmota/mgos32-to-tasmota32 |
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
What does this implement/fix?
Adds "compressed=1" to /download.bin endpoint.
As described in feature-requests#2276, this would greatly simplify future migrations for other users since they could convert a device just issuing two Tasmota commands:
This would instruct Tasmota device to download the image directly from esphome web server and flash itself without human intervention via Tasmota web UI.
Increases download buffer size to 256KB.
The current code uses a 16KB buffer size which seems very small (even for RPI installs).
Since the code doesn't give any rationale as to why this value was chosen I took the liberty of increasing it to 256KB, given that this gave me the ideal compression size in some ad hoc tests I made. It could also benefit (albeit in a much smaller capacity) the download of uncompressed images.
Types of changes
Related issue or feature (if applicable): fixes feature-requests#2276
Pull request in esphome-docs with documentation (if applicable): (none)
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: